package cn.hrbnu.web;

import cn.hrbnu.service.CategoryService;
import cn.hrbnu.util.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/category")
public class CategoryController {

    private final CategoryService categoryService;

    public CategoryController(CategoryService categoryService) {
        this.categoryService = categoryService;
    }

    @GetMapping("/getCategoryList")
    public ResponseResult<Object> getCategoryList() {
        return categoryService.getCategoryList();
    }
}
